{% extends "nomcom/nomcom_private_base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% block subtitle %}- Defined templates{% endblock %}
{% block nomcom_content %}
    {% origin %}
    <h2 class="mt-4">Defined templates</h2>
    {% if template_list %}
        <ul>
            {% for template in template_list %}
                <li>
                    <a href="{% url 'ietf.nomcom.views.edit_template' year template.id %}">{{ template }}</a>
                </li>
            {% endfor %}
        </ul>
    {% else %}
        <p>
            There are no templates defined for this group.
        </p>
    {% endif %}
    <h2 class="mt-4">Defined templates for positions</h2>
    {% for position in nomcom.position_set.all %}
        <h3 class="mt-3">{{ position.name }}</h3>
        <ul>
            {% for template in position.get_templates %}
                <li>
                    <a href="{% url 'ietf.nomcom.views.edit_template' year template.id %}">{{ template }}</a>
                </li>
            {% endfor %}
        </ul>
    {% empty %}
        <p>
            There are no positions defined.
        </p>
    {% endfor %}
    <h2 class="mt-4">Defined templates for topics</h2>
    {% for topic in nomcom.topic_set.all %}
        <h3 class="mt-3">{{ topic.subject }}</h3>
        <ul>
            <li>
                <a href="{% url 'ietf.nomcom.views.edit_template' year topic.description.id %}">{{ topic.description }}</a>
            </li>
        </ul>
    {% empty %}
        <p>
            There are no topics defined.
        </p>
    {% endfor %}
{% endblock %}